<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('shopsetting'.$merchid,$postdata);
		exi('设置成功');
	}
	$indexcube =array(
		array('title'=>'首页','image'=>'../addons/jy_weishop/resource/images/mobile-hdp02.jpg','action'=>'jy_lianmerch/merchshop/'),
	);
	$footernav = array(
			array('title'=>'商城','icon'=>'icon-shouye','color'=>'#cc99ff','action'=>'jy_mshop2fee/index/'),
			array('title'=>'分销中心','icon'=>'icon-caifua','color'=>'#cc99ff','action'=>'jy_mshop2fee/tindex/'),
			array('title'=>'分红','icon'=>'icon-caifua','color'=>'#66cc99','action'=>'jy_mshop2fee/commission/'),
			array('title'=>'团订单','icon'=>'icon-manageorder','color'=>'#ff9933','action'=>'jy_mshop2fee/order/'),
			array('title'=>'我的团','icon'=>'icon-paihao0','color'=>'#66cc66','action'=>'jy_mshop2fee/down/'),
	);
	
	$return['item']=$this->plugin_setting('shopsetting'.$merchid);
	$return['item']['indexcube']=$return['item']['indexcube']?$return['item']['indexcube']:$indexcube;
	$return['item']['footernav'] = !empty($return['item']['footernav']) ? $return['item']['footernav'] : $footernav;
	$htmls=array(
		'type'=>'edit',
		'desc'=>'参数设置',
		'tabs'=>$tabs,
		'edit_tab'=>true,
		'edits'=>array(
			array(
				'title'=>'基本信息',
				'list'=>array(
					array('type'=>'string','title'=>'网站名称','name'=>'title'),
					array('type'=>'image','title'=>'网站logo','name'=>'logo'),
					array('type'=>'string','title'=>'分享标题','name'=>'share_title'),
					array('type'=>'image','title'=>'分享图片','name'=>'share_image'),
					array('type'=>'string','title'=>'分享描述','name'=>'share_desc'),
				)
			),
			array(
				'title'=>'幻灯片',
					'list'=>array(
						array(
							'type'=>'array',
							'name'=>'hdps',
							'add_tip'=>'添加一个幻灯片',
								'list'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片'),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								),
								'details'=>array(
									array('type'=>'image','name'=>'picurl','title'=>'幻灯片图片','help'=>''),
									array('type'=>'string','name'=>'url','title'=>'幻灯片链接'),
									
								)
						)
					)
			),
			array(
							'title'=>'商城底部导航',
							'list'=>array(
								array('type'=>'array','name'=>'footernav','add_tip'=>'添加一个底部导航',
									'list'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'string','name'=>'action','title'=>'导航链接'),
									),
									'details'=>array(
										array('type'=>'string','name'=>'title','title'=>'导航名称'),
										array('type'=>'icon','name'=>'icon','from'=>'jinyunicon','title'=>'导航图标'),
										array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
									)
								),
							)
			),
			array(
				'title'=>'板块导航',
				'list'=>array(
						array('type'=>'array','name'=>'bankuai1','add_tip'=>'添加一个板块导航',
						'list'=>array(
							array('type'=>'string','name'=>'title','title'=>'导航名称'),
							array('type'=>'image','name'=>'img','title'=>'导航图片'),
							array('type'=>'string','name'=>'action','title'=>'导航链接'),										
						),
						'details'=>array(
							array('type'=>'string','name'=>'title','title'=>'导航名称'),
							array('type'=>'image','name'=>'img','title'=>'导航图片'),							
							array('type'=>'link','name'=>'action','from'=>'action','title'=>'导航链接'),
						)
					),
				)
			),
			array(
					'title'=>'首页插图',
					'list'=>array(
						array('type'=>'array','name'=>'indexcube','add_tip'=>'添加一个插图',
								'list'=>array(
									array('type'=>'image','name'=>'image','title'=>'图片'),	
									array('type'=>'string','name'=>'url','title'=>'链接'),
								),
								'details'=>array(
									array('type'=>'image','name'=>'image','title'=>'图片'),
									array('type'=>'link','name'=>'url','from'=>'action','title'=>'链接'),
								)
						),
					)
			)
		)
	);
	$return['htmls']=$htmls;
	exi($return);
}


